package com.xinyue.game.server;

import org.springframework.boot.Banner.Mode;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.ApplicationContext;

import com.xinyue.game.handler.GameHandlerMappingManager;
import com.xinyue.game.server.framework.RocketMQConsumerService;

@SpringBootApplication
public class GameServerLaunchMain {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(GameServerLaunchMain.class);
        app.setBannerMode(Mode.LOG);
        app.setWebApplicationType(WebApplicationType.NONE);
        ApplicationContext context = app.run(args);
        GameHandlerMappingManager.getInstance().scanGameHandler(context);
        RocketMQConsumerService rocketMQConsumerService = context.getBean(RocketMQConsumerService.class);
        rocketMQConsumerService.init();
    }
}

